<template>
  <div>
    <van-nav-bar :title="active" fixed />
    <div class="main">
      <router-view></router-view>
    </div>
    <div>
      <van-tabbar v-model="active" route>
        <van-tabbar-item name="首页" icon="home-o" to="/home"
          >首页</van-tabbar-item
        >
        <van-tabbar-item name="评论" icon="fire-o" to="/comment"
          >评论</van-tabbar-item
        >
        <van-tabbar-item name="搜索" icon="search" to="/search"
          >搜索</van-tabbar-item
        >
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: this.$route.meta.title,
    };
  },
};
</script>

<style scoped>
.main {
  padding-top: 1.226667rem;
  padding-bottom: 1.333333rem;
}
</style> 